package com.yy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 购物车实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "购物车实体类")
public class ShoppingCart implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "菜品或套餐名")
    private String name;
    @ApiModelProperty(value = "图片")
    private String image;
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "菜品id")
    private Long dishId;
    @ApiModelProperty(value ="套餐id")
    private Long setmealId;
    @ApiModelProperty("数量")
    private Integer number;
    @ApiModelProperty("金额")
    private BigDecimal amount;
    @ApiModelProperty("创建时间")
    private  LocalDateTime createTime;
    @Transient
    private BigDecimal price;
    @Transient
    private Long orderId;
}
